// pages/user/index.js
Page({
  data: {
    userinfo: {},
    collectGoods: 0
  },

  onShow: function () {
    let collectGoods = (wx.getStorageSync('collect') || []).length
    // let collectGoodslength = collectGoods.length
    let userinfo = wx.getStorageSync("userInfo");
    this.setData({
      userinfo,
      collectGoods
    })
  },

})